﻿<%@ Page Language="C#" %>
<%
    YunSpace.Web.Common.Tools.CheckLogin();
    string typeid = Request.QueryString["typeid"];
    if(!typeid.IsGuid())
    {
        Response.Write("");
        Response.End();
    }
    var workFlowFrom = new YunSpace.Application.WorkFlow.FormDesignerApp();
    var forms = workFlowFrom.GetAllByType(typeid);
    System.Text.StringBuilder html = new System.Text.StringBuilder();
    foreach (var form in forms.Where(p=>p.F_Status<2).OrderBy(p=>p.F_Name))
    {
        html.Append("<tr>");
        html.AppendFormat("<td style='background:#ffffff;'>{0}</td>",form.F_Name);
        html.AppendFormat("<td style='background:#ffffff;'>{0}</td>", form.F_CreatorTime);
        html.AppendFormat("<td style='background:#ffffff;'>{0}</td>", form.F_CreatorUserName);
        html.AppendFormat("<td style='background:#ffffff;'>{0}</td>", workFlowFrom.GetStatusTitle(form.F_Status ?? 0));
        html.AppendFormat("<td style='background:#ffffff;'>{0}</td>", string.Format(@"<a href=""javascript:void(0);"" onclick=""openform('{0}');return false;"">
                    <img src=""{1}Images/ico/folder_classic_opened.png"" alt="""" style=""vertical-align:middle; border:0;"" />
                    <span style=""vertical-align:middle;"">打开</span>
                    </a>
                    <a href=""javascript:void(0);"" onclick=""delform('{0}');return false;"">
                    <img src=""{1}Images/ico/cancel.gif"" alt="""" style=""vertical-align:middle; border:0; margin-left:5px;"" />
                    <span style=""vertical-align:middle;"">删除</span>
                    </a>", form.F_Id, YunSpace.Web.Common.Tools.BaseUrl));
        html.Append("</tr>");
    }
    Response.Write(html.ToString());
    Response.End();
%>